package com.example.api.remote.seervice;

import com.example.api.domain.Person;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/remote")
public interface HelloRemoteService {

    /**
     * requestParam
     * @param name 姓名
     * @return String
     */
    @GetMapping("/hello3")
    String hello(@RequestParam("name") String name);

    /**
     * requestHeader
     * @param name 姓名
     * @param age 年龄
     * @return String
     */
    @GetMapping("/hello4")
    String hello(@RequestHeader("name") String name, @RequestHeader("age") Integer age);

    /**
     * requestBody
     * @param person 用户
     * @return String
     */
    @PostMapping("/hello5")
    String hello(@RequestBody Person person);
}
